﻿using SolarWinds.Helpers;

namespace SolarWinds.Particles
{
    public class OmniParticleEmitter : ParticleEmitter
    {
        public OmniParticleEmitter(ParticleEmitterDescription description) : base(description)
        {
        }

        protected override void InitParticle(ref Particle p)
        {
            // set position and velocity
            p.PreviousPosition = mDescription.Position;
            p.Position = p.PreviousPosition;
            p.Velocity = RandomHelper.RandomVector3() * mDescription.Speed;
        }
    }
}
